package com.xuehu.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author guoweia@cslc.com.cn
 * @create 2020/12/10 16:54
 * @desc
 */
@RestController
@RefreshScope
public class ConfigClientController {

    @Value("${server.port}")
    private String serverPort;

    @Value("${xuehuName}")
    private String xuehuName;

    @RequestMapping("/getConfigClientInfo")
    public String getConfigClientInfo() {
        return xuehuName + ",端口：" + serverPort;
    }
}
